//
//  NWTabBarViewController.m
//  World
//
//  Created by lanou on 15/10/24.
//  Copyright © 2015年 小虫. All rights reserved.
//

#import "NWTabBarViewController.h"
#import "NWHomeTableViewController.h"
#import "NWPrivateMakeViewController.h"
#import "NWDiscoverViewController.h"
#import "NWProfileTableViewController.h"
@interface NWTabBarViewController ()

@end

@implementation NWTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    // 设置tab底部字体颜色和大小
    //NSLog(@"%@",[UIFont familyNames]);// 查看系统支持的所有字体
    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor blackColor],NSForegroundColorAttributeName,[UIFont fontWithName:@"Helvetica Neue" size:12.0f],NSFontAttributeName,nil] forState:UIControlStateNormal];
    
    
    NWHomeTableViewController *homeTVC = [[NWHomeTableViewController alloc]initWithStyle:UITableViewStylePlain];
    UINavigationController *homeNVC = [[UINavigationController alloc]initWithRootViewController:homeTVC];
    homeNVC.tabBarItem.title = @"首页";
    homeNVC.tabBarItem.image = [[UIImage imageNamed:@"home.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    NWPrivateMakeViewController *privateMakeVC = [[NWPrivateMakeViewController alloc]init];
    
    UINavigationController *privateMakeNVC = [[UINavigationController alloc]initWithRootViewController:privateMakeVC];
    privateMakeNVC.tabBarItem.title = @"私人定制";
    privateMakeNVC.tabBarItem.image = [[UIImage imageNamed:@"privite.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    
    NWDIscoverViewController *discoverVC = [[NWDIscoverViewController alloc]init];
    UINavigationController *discoverNVC = [[UINavigationController alloc]initWithRootViewController:discoverVC];
    discoverNVC.tabBarItem.title = @"发现";
    discoverNVC.tabBarItem.image = [[UIImage imageNamed:@"discover.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    
    NWProfileTableViewController *profileTVC = [[NWProfileTableViewController alloc]initWithStyle:UITableViewStylePlain];
    UINavigationController *profileNVC = [[UINavigationController alloc]initWithRootViewController:profileTVC];
    profileNVC.tabBarItem.title = @"我的";
    profileNVC.tabBarItem.image = [[UIImage imageNamed:@"person.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    
   self.viewControllers = @[homeNVC,privateMakeNVC,discoverNVC,profileNVC];
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
